package com.hualan.dao.impl;

import com.hualan.dao.ShopCommunityDao;
import com.hualan.utils.C3p0Util;


import java.util.Map;

/**
 * 关联小区Dao实现
 */
public class ShopCommunityDaoImpl implements ShopCommunityDao {
    //通过小区id获取关联小区数量
    @Override
    public Long getShopCommunityCount(Integer communityId) {
        String sql = "select count(*) as count from panghu_shop_community where panghu_community_id = ?";
        Map<String, Object> map = C3p0Util.queryOne(sql,communityId);
        Object count = map.get("count");
        return (Long) count;
    }
}
